home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games: Greatest Hits 1996 / Amiga Games: Greatest Hits 1996.iso / archive / spiele / demoversionen / pawsoffury.dms / pawsoffury.adf / LazyMines_v2.1 / Install next >
Text File  |  1978-10-30  |  4KB  |  118 lines

  1. ;;; Strings
  2.  
  3. (set #how-install
  4.      (cat "Do you want to install the whole program or just update the "
  5.           "language catalogs?"))
  6.  
  7. (set #how-install-help
  8.      (cat "Choose \"Install whole program\" if you are installing from "
  9.           "scratch or if you are updating an old version.\n"
  10.           "\nChoose \"Update languages\" if you want to install new "
  11.           "language catalogs."))
  12.  
  13. (set #how-install-1 "Install whole program")
  14. (set #how-install-2 "Update languages")
  15.  
  16. (set #where-install
  17.      "Choose location where you want to install LazyMines.")
  18.  
  19. (set #which-icons
  20.      "Which icons do you want to install with LazyMines?")
  21.  
  22. (set #which-icons-help
  23.      (cat "Choose \"MagicWB icons\" if you have MagicWB installed, "
  24.           "otherwise choose \"Standard icons\"."))
  25.  
  26. (set #which-icons-1 "MagicWB icons")
  27. (set #which-icons-2 "Standard icons")
  28.  
  29. (set #where-languages
  30.      "Where do you want to install the language catalogs?")
  31.  
  32. (set #where-languages-help
  33.      (cat "This lets you choose if you want the language catalogs to be "
  34.           "copied to the same location as the rest of the program, or if "
  35.           "you want to have them in the global Catalog dir."))
  36.  
  37. (set #which-languages
  38.      "Which languages do you want LazyMines to support?")
  39.  
  40. (set #which-languages-help
  41.      (cat "Check all languages you want LazyMines to support.\n"
  42.           "\nIf a language is already installed and you don't check it, "
  43.           "it will be removed."))
  44.  
  45. ;;; Procedures
  46.  
  47. (procedure install-program
  48.   (set @default-dest prog-dest)
  49.   (copylib (source (tackon sourcedir "LazyMines"))
  50.            (dest prog-dest))
  51.   (copylib (source (tackon sourcedir "LazyMines.guide"))
  52.            (dest prog-dest)))
  53.  
  54. (procedure install-icons
  55.   (set which-icons (askchoice (prompt #which-icons)
  56.                               (help #which-icons-help)
  57.                               (choices #which-icons-1 #which-icons-2)))
  58.   (if (= which-icons 1)
  59.       (set icon-srcdir (tackon icon-srcdir "misc")))
  60.   (copyfiles (source icon-srcdir)
  61.              (dest prog-dest)
  62.              (choices "LazyMines.info" "LazyMines.guide.info"))
  63.   (tooltype (dest (tackon prog-dest "LazyMines"))
  64.             (noposition))
  65.   (tooltype (dest (tackon prog-dest "LazyMines.guide"))
  66.             (noposition)))
  67.  
  68. (procedure install-locales
  69.   (set where-languages (askchoice (prompt #where-languages)
  70.                                   (help #where-languages-help)
  71.                                   (choices locale-dest
  72.                                            locale-sysdest)))
  73.   (if (= where-languages 1)
  74.       (set locale-dest locale-sysdest))
  75.   (set which-languages (askoptions (prompt #which-languages)
  76.                                    (help #which-languages-help)
  77.                                    (choices "Svenska")))
  78.   (set locale "svenska")
  79.   (if (IN which-languages 0)
  80.       (install-locale)
  81.       (remove-locale)))
  82.  
  83. (procedure install-locale
  84.   (makedir locale-dest)
  85.   (makedir (tackon locale-dest locale))
  86.   (copylib (source (tackon (tackon locale-srcdir locale) "lazymines.catalog"))
  87.            (dest (tackon locale-dest locale))))
  88.  
  89. (procedure remove-locale
  90.   (delete (tackon (tackon locale-dest locale) "lazymines.catalog"))
  91.   (if (NOT (= locale-dest locale-sysdest))
  92.       ((delete (tackon locale-dest locale))
  93.        (delete locale-dest))))
  94.  
  95.  
  96. ;;; Main program
  97.  
  98. (set sourcedir (pathonly @icon))
  99. (set icon-srcdir sourcedir)
  100. (set locale-srcdir (tackon sourcedir "Catalogs"))
  101. (set locale-sysdest "LOCALE:Catalogs")
  102.  
  103. (set prog-dest (askdir (prompt #where-install)
  104.                        (help @askdir-help)
  105.                        (default @default-dest)))
  106.  
  107. (set how-install (askchoice (prompt #how-install)
  108.                             (help #how-install-help)
  109.                             (choices #how-install-1 #how-install-2)))
  110.  
  111. (if (= how-install 0)
  112.     ((install-program)
  113.      (install-icons))
  114.     (set @default-dest ""))
  115.  
  116. (set locale-dest (tackon prog-dest "Catalogs"))
  117. (install-locales)
  118.